package com.example.tms.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.example.tms.tools.GlobalParam;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;
import java.util.UUID;

/**
 * 角色信息
 */
@Table(name = "role_info")
@Entity
public class RoleInfo {
    @Id
    private String jsid;
    private String jsmc;
    private Boolean sfcz;
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date jstime;
    @Transient
    private List<String> permsidList;

    public RoleInfo(){}

    public RoleInfo(String jsmc){
        this.jsid = UUID.randomUUID().toString().replaceAll("-","");
        this.jsmc = jsmc;
        this.sfcz = true;
        this.jstime = GlobalParam.getTime();
    }

    public String getJsid() {
        return jsid;
    }

    public void setJsid(String jsid) {
        this.jsid = jsid;
    }

    public String getJsmc() {
        return jsmc;
    }

    public void setJsmc(String jsmc) {
        this.jsmc = jsmc;
    }

    public Boolean getSfcz() {
        return sfcz;
    }

    public void setSfcz(Boolean sfcz) {
        this.sfcz = sfcz;
    }

    public Date getJstime() {
        return jstime;
    }

    public void setJstime(Date jstime) {
        this.jstime = jstime;
    }

    public List<String> getPermsidList() {
        return permsidList;
    }

    public void setPermsidList(List<String> permsidList) {
        this.permsidList = permsidList;
    }
}
